<?php
//
// +------------------------------------------------------------------------+
// | PHP Version 5.4                                                        |
// +------------------------------------------------------------------------+
// | Copyright (c) All rights reserved.                                     |
// +------------------------------------------------------------------------+
// | 世纪车来车往(北京）网络科技有限公司 版权所有!                                 |
// | TEL:010-63732365  HOTLINE:400-6688-365  EMAIL:clcw@clcw.com.cn         |
// | $Revision: 1.0 $                                                       |
// +------------------------------------------------------------------------+
// | Author: Xmh<xiangminghu@clcw.com.cn>                                   |
// +------------------------------------------------------------------------+
//

namespace AuctionCore\Agent;


class Reward
{
    /**
     * 新增奖励总账记录
     *
     * @param $aid
     * @param $other_aid
     * @param $type
     * @param $cash
     * @param $integral
     * @param $growth
     *
     * @return bool|mixed
     */
    public static function add($aid, $other_aid, $type, $cash, $integral, $growth)
    {
        if (intval($aid) < 1 || intval($other_aid) < 1 || $type < 1) {
            return false;
        }
        $data = array(
            'aid' => $aid,
            'other_aid' => $other_aid,
            'type' => $type,
            'cash' => $cash,
            'integral' => $integral,
            'growth' => $growth,
            'create_time' => time()
        );
        $r_id = M('reward','au_','DB_CLCW')->add($data);
        return $r_id;
    }
}